#ifndef LOGINPAGE_H
#define LOGINPAGE_H

#include "fileio.h"
#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
namespace Ui {
class LoginPage;
}

class LoginPage : public QWidget
{
    Q_OBJECT

public:
    explicit LoginPage(QWidget *parent = 0);
    ~LoginPage();

private:
    Ui::LoginPage *ui;
    QLabel *accountLabel;
    QLabel *passwordLabel;
    QLineEdit *accountLine;
    QLineEdit *passwordLine;
    QPushButton *registerButtton;
    QPushButton *loginButton;
    QPushButton *clearButton;
    QPushButton *exitButton;
    FileIO* userFile;

signals:
    void hide();
    void destory();
    void toPage(QString pageName);
private slots:
    void toRegister();
    void checkPwd();
    void clearAll();
    void clearPwd();


};

#endif // LOGINPAGE_H
